package appfuse.framework.util;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

import javax.servlet.ServletContext;

/**
 * 得到配置信息
 * @author Felon
 *
 */
public class GetConfig {
	public static Integer getSiteNo(ServletContext context) throws IOException{
		File file=new File(context.getRealPath("/WEB-INF/classes/fromsite.txt"));
		FileReader fileReader = new FileReader(file);
		BufferedReader br = new BufferedReader(fileReader);
		String line = br.readLine();// 从文件读取一行字符串
		br.close();// 关闭BufferedReader对象
		fileReader.close();// 关闭文件
		return new Integer(line);
	}
}
